package cn.mesmile.order.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author zb
 * @version 1.0
 * @date 2020/10/24 13:55
 * @description
 */
@Configuration
public class MyRestConfig {

    /**
     *  @LoadBalanced  ribbon 负载均衡  默认是 轮训的策略
     */
    @Bean
    @LoadBalanced
    public RestTemplate getRestTemplate () {
        return new RestTemplate();
    }

}
